import request from '@/utils/request'

// 查询产品分页列表
export function getProductListApi(query) {
  return request({
    url: "/business/product/list",
    method: "GET",
    params: query,
  });
}

// 查询产品所有列表
export function getAllProductListApi(query) {
  return request({
    url: "/business/product/listAll",
    method: "GET",
    params: query,
  });
}

// 删除产品
export function deleteProductApi(pkProProducts) {
  return request({
    url: "/business/product/remove/" + pkProProducts,
    method: "GET",
  });
}

// 导出产品列表
export function exportProductApi(data) {
  return request({
    url: "/business/product/export",
    method: "post",
    data,
  });
}
// 添加产品
export function addProductApi(data) {
  return request({
    url: "/business/product/add",
    method: "post",
    data,
  });
}

// 查询工艺流程列表
export function getTecProListApi(query) {
  return request({
    url: "/business/tecPro/list",
    method: "GET",
    params: query,
  });
}

// 查询工艺流程所有列表
export function getTecProAllListApi(query) {
  return request({
    url: "/business/tecPro/listAll",
    method: "GET",
    params: query,
  });
}

// 新增工艺流程
export function addTecProApi(data) {
  return request({
    url: "/business/tecPro/add",
    method: "post",
    data,
  });
}

// 修改工艺流程
export function editTecProApi(data) {
  return request({
    url: "/business/tecPro/edit",
    method: "post",
    data,
  });
}

// 删除工艺流程
export function removeCraftInfo(pkProTecPros) {
  return request({
    url: "/business/tecPro/remove/" + pkProTecPros,
    method: "get",
  });
}

// 新增单位
export function addUnitApi(data) {
  return request({
    url: "/business/unit/add",
    method: "post",
    data,
  });
}

// 修改单位
export function updateUnitApi(data) {
  return request({
    url: "/business/unit/edit",
    method: "post",
    data,
  });
}

// 删除单位
export function removeUnitInfo(ids) {
  return request({
    url: "/business/unit/remove/" + ids,
    method: "get",
  });
}

// 查询单位列表
export function getUnitListApi(query) {
  return request({
    url: "/business/unit/list",
    method: "GET",
    params: query,
  });
}

// 查询所有单位列表
export function getUnitListAllApi() {
  return request({
    url: "/business/unit/listAll",
    method: "GET",
  });
}

